<div class="role information" ui-view="container">
    <div class="head_title">
        <span class="jump-color" ui-sref="main.role({pageNo:1})">角色管理</span>
        <span class="tit-color"> / 角色创建</span>
    </div>
    <form class="form-horizontal create-input w5c-form content-margin"  w5c-form-validate name="mainForm">

        <div class="header">基本信息</div>

        <section class="fg-section">


            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>角色名称：</label>
                <div class="col-sm-7 personal-head">
                    <input type="text" class="input" placeholder="角色名称" ng-model="formData.roleName" name="roleName" ng-if="!roleId" w5c-dynamic-element
                           required="" ng-minlength="2" ng-maxlength="40" >
                    <span class="disable_span" ng-if="roleId">{{formData.roleName}}</span>
                </div>
            </div>
            <div class="form-group personal-second">
                <label class="col-sm-3 control-label"><i class="red-icon">*</i>角色说明：</label>
                <div class="col-sm-7 personal-head">

                    <input type="text" class="input long-input" placeholder="角色说明" ng-model="formData.roleExplain"
                           name="roleExplain"
                           required="" ng-maxlength="100">

                </div>
            </div>

        </section>
        <div class="header">权限设置</div>

        <section class="fg-section">
            <table class="table table-bordered table-hover table-page ">

                <tbody>
                <tr>
                    <td>
                        CP中心
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer;">
                                <input type="checkbox" ng-model="formData.permission.cpReview" class="magic-checkbox"
                                       id="cpCheck" ng-true-value="1" ng-false-value="0">
                                <label for="cpCheck" style="padding-top: 2px;"></label>
                                CP审核
                            </label>
                        </div>
                        <div>
                            <label style="cursor: pointer;">
                                <input type="checkbox" ng-model="formData.permission.cpClear" class="magic-checkbox"
                                       id="cpAccount" ng-true-value="1" ng-false-value="0">
                                <label for="cpAccount" style="padding-top: 2px;"></label>
                                CP结算
                            </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        内容中心
                    </td>
                    <td>
                        <div ng-repeat="channel in reviewChannels" style="margin-top: 10px">
                            <div style="width: 120px" class="pull-left">审核{{channel.categoryName}}:</div>
                            <div class="pull-left" style="width: 600px">
                                <label style="cursor: pointer">
                                    <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                              ng-model="channel.checked" class="magic-checkbox"
                                              id="{{channel.categoryId}}" ng-change="channelAllChecked(channel)">
                                    <label for="{{channel.categoryId}}" style="padding-top: 2px;"></label>
                                    全选
                                </label>
                                <br>

                                <label ng-repeat="item in channel.list" style="width: 90px;cursor: pointer;">
                                    <input type="checkbox" ng-true-value="1" ng-false-value="0" ng-model="item.checked"
                                           class="magic-checkbox" id="check{{item.channelId}}" ng-change="itemChange(channel,item)">
                                    <label for="check{{item.channelId}}" style="padding-top: 2px;"></label>
                                    {{item.channelName}}
                                </label>
                            </div>

                            <div class="clear"></div>

                        </div>
                        <hr>
                        <div ng-repeat="channel in editchannels"  style="margin-top: 10px">
                            <div style="width: 120px" class="pull-left">编目{{channel.categoryName}}:</div>
                            <div class="pull-left" style="width: 600px">
                                <label style="cursor: pointer">
                                    <input type="checkbox" ng-true-value="1" ng-false-value="0" ng-change="channelAllChecked(channel)"
                                              ng-model="channel.checked" class="magic-checkbox"
                                              id="edit{{channel.categoryId}}">
                                    <label for="edit{{channel.categoryId}}" style="padding-top: 2px;" ></label>
                                    全选
                                </label>
                                <br>
                                <label ng-repeat="item in channel.list" style="width: 90px;cursor: pointer;">
                                    <input type="checkbox" ng-true-value="1" ng-false-value="0" ng-model="item.checked"
                                           class="magic-checkbox" id="catalog{{item.channelId}}"  ng-change="itemChange(channel,item)">
                                    <label for="catalog{{item.channelId}}" style="padding-top: 2px;"></label>
                                    {{item.channelName}}
                                </label>

                            </div>
                            <div class="clear"></div>

                        </div>
                        <hr>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.channel" class="magic-checkbox" id="channel">
                                <label for="channel" style="padding-top: 2px;"></label>
                                频道管理
                            </label>
                        </div>
                        <hr>

                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.tag" class="magic-checkbox" id="tags">
                                <label for="tags" style="padding-top: 2px;"></label>
                                标签管理
                            </label>
                        </div>


                    </td>
                </tr>
                <tr>
                    <td>
                        播控中心
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.play" class="magic-checkbox" id="play">
                                <label for="play" style="padding-top: 2px;"></label>
                                播控管理
                            </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        合约中心
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.contract" class="magic-checkbox" id="contract">
                                <label for="contract" style="padding-top: 2px;"></label>
                                合约管理
                            </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        消息中心
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.advice" class="magic-checkbox" id="notice">
                                <label for="notice" style="padding-top: 2px;"></label>
                                公告通知
                            </label>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        数据中心
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.stat" class="magic-checkbox" id="dataCenter">
                                <label for="dataCenter" style="padding-top: 2px;"></label>
                                数据中心
                            </label>
                        </div>
                    </td>

                </tr>
                <tr>
                    <td class="form-group">
                        <label class="control-label">系统设置</label>
                    </td>
                    <td>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.users" class="magic-checkbox" id="user">
                                <label for="user" style="padding-top: 2px;"></label>
                                用户管理
                            </label>
                        </div>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.roles" class="magic-checkbox" id="role">
                                <label for="role" style="padding-top: 2px;"></label>
                                角色管理
                            </label>
                        </div>
                        <div>
                            <label style="cursor: pointer">
                                <input type="checkbox" ng-true-value="1" ng-false-value="0"
                                       ng-model="formData.permission.logs" class="magic-checkbox" id="log">
                                <label for="log" style="padding-top: 2px;"></label>
                                系统日志
                            </label>
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>

        </section>


        <footer class="container-fluid foot-wrap" style="padding-bottom: 20px">
            <div class="text-center">
                <button class="btn btn-primary" style="padding: 3px 16px;width: 90px" type="button"
                        w5c-form-submit="submit()">{{'提交'}}
                </button>
                <button type="button" class="btn ims-btn" style="width: 90px" ui-sref="main.role">取消</button>
            </div>
        </footer>

    </form>


</div>
